package com.ruoyi.marketing.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 营销页面对象 marketing_activity
 *
 * @author hao
 * @date 2023-01-28
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("marketing_activity")
public class MarketingActivity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 活动id
     */
    @TableId(type = IdType.AUTO)
    @TableField("activity_id")
    private Long activityId;

    /**
     * 名称
     */
    @Excel(name = "名称")
    @TableField("activity_name")
    private String activityName;

    /**
     * 序号
     */
    @Excel(name = "序号")
    @TableField("orders")
    private Long orders;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("creates_time")
    private Date createsTime = new Date();

    /**
     * 显示位置
     */
    @Excel(name = "显示位置")
    @TableField("location")
    private String location;

    /**
     * BANNER图
     */
    @Excel(name = "BANNER图")
    @TableField("image")
    private String image;

    /**
     * H5链接
     */
    @Excel(name = "H5链接")
    @TableField("h5")
    private String h5;

    /**
     * 开始有效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始有效时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("start_time")
    private Date startTime;

    /**
     * 结束有效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束有效时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("end_time")
    private Date endTime;

    /**
     * 活动规则
     */
    @Excel(name = "活动规则")
    @TableField("rule")
    private Long rule;

    /**
     * 状态
     */
    @Excel(name = "状态")
    @TableField("state")
    private Long state;

//    /**
//     * 开始时间
//     */
//    @TableField(exist = false) //不被 mybatisPlus 扫描到
//    private ActivityVO times;
}
